<style lang='scss' type='stylesheet/scss' scoped>
.as-button {
  margin-bottom: 10px;
}
</style>
<template>
  <div>
    <as-h2>icon</as-h2>
    <as-card :text="text"
             title="可以单独配置 icon">
      <as-button @click="handlerInfo">点击</as-button>
      <as-button @click="handlerSuccess" type="success">成功</as-button>
    </as-card>
  </div>
</template>

<script type="text/ecmascript-6">
import { mapGetters } from "vuex";
export default {
  name: "",
  computed: {
    ...mapGetters(["isMobile"])
  },
  data() {
    return {
      name: "12345678901",
      text: `<template>
   <div>
     <as-button @click="handlerInfo">点击</as-button>
     <as-button @click="handlerSuccess" type="success">成功</as-button>
   </div>
 </template>
 <script>  
   export default{
     methods: {
       handlerSuccess() {
         this.$message({
           message: "点击了信息",
           type: "success",
           duration: 3000,
           icon: "el-icon-check"
         });
       },
       handlerInfo() {
         this.$message("点击了信息", "info", 3000,  "el-icon-edit");
       }
     }
   }
 <\/script>`
    };
  },
  methods: {
    handlerSuccess() {
      this.$message({
        message: "点击了信息",
        type: "success",
        duration: 3000,
        icon: "el-icon-check"
      });
    },
    handlerInfo() {
      this.$message("点击了信息", "info", 3000, "el-icon-edit");
    }
  }
};
</script>
